package com.wiscamp.ninechapters.problems.math;

import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;

/**
 * Latex文本
 */
@Data
public class LatexText implements Serializable {
    /**
     * Latex 文本的枚举
     */
    protected LatexTextEnum latexType;

    /**
     * Latex文本
     */
    protected String textValue;

    public LatexText() {
    }

    public LatexText(String textValue, LatexTextEnum latexType) {
        this.textValue = textValue;
        this.latexType = latexType;
    }

    public String getLatex() {
        return textValue;
    }

    /**
     * @return
     */
    public Collection<String> toTerms() {
        var list = new ArrayList<String>();
        list.add(textValue);
        return list;
    }
}
